package tr.edu.metu.is.mega.server.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * The persistent class for the courseassistant database table.
 * 
 */
@Entity
public class Courseassistant implements Serializable, tr.edu.metu.is.mega.server.core.BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer pkid;

    // bi-directional many-to-one association to Course
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "fk_courseid")
    private Course course;

    // bi-directional many-to-one association to Systemuser
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "fk_userid", updatable = false)
    private Systemuser systemuser;

    /**
     * Default constructor.
     */
    public Courseassistant() {
    }

    /**
     * Returns pkid.
     * 
     * @return the pkid
     */
    @Override
    public Integer getPkid() {
        return pkid;
    }

    /**
     * Sets pkid value.
     * 
     * @param pkid the pkid to set
     */
    @Override
    public void setPkid(Integer pkid) {
        this.pkid = pkid;
    }

    /**
     * Returns course.
     * 
     * @return the course
     */
    public Course getCourse() {
        return course;
    }

    /**
     * Sets course value.
     * 
     * @param course the course to set
     */
    public void setCourse(Course course) {
        this.course = course;
    }

    /**
     * Returns systemuser.
     * 
     * @return the systemuser
     */
    public Systemuser getSystemuser() {
        return systemuser;
    }

    /**
     * Sets systemuser value.
     * 
     * @param systemuser the systemuser to set
     */
    public void setSystemuser(Systemuser systemuser) {
        this.systemuser = systemuser;
    }

}
